inherited fClassJournalPrograms: TfClassJournalPrograms
  Left = 733
  Top = 200
  Width = 491
  Height = 449
  Caption = #1059#1095#1077#1073#1085#1099#1077' '#1087#1088#1086#1075#1088#1072#1084#1084#1099
  PixelsPerInch = 96
  TextHeight = 13
  inherited sbBottom: TStatusBar
    Top = 395
    Width = 483
  end
  inherited Panel1: TPanel
    Top = 350
    Width = 483
    Align = alBottom
    inherited BitBtn1: TBitBtn
      Left = 300
    end
    inherited BitBtn2: TBitBtn
      Left = 388
    end
  end
  object pTop: TPanel [2]
    Left = 0
    Top = 0
    Width = 483
    Height = 41
    Align = alTop
    TabOrder = 2
    object lClass: TLabel
      Left = 8
      Top = 11
      Width = 33
      Height = 13
      Caption = #1050#1083#1072#1089#1089':'
    end
    object lParallel: TLabel
      Left = 184
      Top = 11
      Width = 59
      Height = 13
      Caption = #1055#1072#1088#1072#1083#1083#1077#1083#1100':'
    end
    object cbClass: TcxComboBox
      Left = 50
      Top = 8
      Properties.DropDownListStyle = lsFixedList
      Properties.OnEditValueChanged = cbClassPropertiesEditValueChanged
      TabOrder = 0
      Width = 121
    end
    object seParallel: TcxSpinEdit
      Left = 256
      Top = 8
      Properties.AssignedValues.MinValue = True
      Properties.ImmediatePost = True
      Properties.MaxValue = 11.000000000000000000
      TabOrder = 1
      Value = 1
      Width = 49
    end
    object bAuto: TcxButton
      Left = 320
      Top = 6
      Width = 153
      Height = 25
      Caption = #1040#1074#1090#1086#1084#1072#1090#1080#1095#1077#1089#1082#1080
      TabOrder = 2
      OnClick = bAutoClick
    end
  end
  object gSubject: TcxGrid [3]
    Left = 0
    Top = 41
    Width = 483
    Height = 309
    Align = alClient
    BevelOuter = bvNone
    BorderWidth = 6
    TabOrder = 3
    object vSubject: TcxGridTableView
      NavigatorButtons.ConfirmDelete = False
      FilterBox.Visible = fvNever
      OnFocusedRecordChanged = vSubjectFocusedRecordChanged
      DataController.Summary.DefaultGroupSummaryItems = <>
      DataController.Summary.FooterSummaryItems = <
        item
          Kind = skCount
        end>
      DataController.Summary.SummaryGroups = <>
      DataController.OnRecordChanged = vSubjectDataControllerRecordChanged
      OptionsBehavior.CellHints = True
      OptionsCustomize.ColumnFiltering = False
      OptionsCustomize.ColumnGrouping = False
      OptionsCustomize.ColumnSorting = False
      OptionsData.CancelOnExit = False
      OptionsData.Deleting = False
      OptionsData.DeletingConfirmation = False
      OptionsData.Inserting = False
      OptionsSelection.HideFocusRectOnExit = False
      OptionsView.ColumnAutoWidth = True
      OptionsView.GroupByBox = False
      Styles.Content = DMInv.cxData
      Styles.IncSearch = DMInv.cxKrasniyText
      Styles.Selection = DMInv.cxJoltiyFon
      Styles.Header = DMInv.cxSiniyText
      object cSID: TcxGridColumn
        DataBinding.ValueType = 'Integer'
        Visible = False
        VisibleForCustomization = False
      end
      object cSubject: TcxGridColumn
        Caption = #1055#1088#1077#1076#1084#1077#1090
        Options.Editing = False
      end
      object cKurs: TcxGridColumn
        Caption = #1050#1091#1088#1089
        PropertiesClassName = 'TcxComboBoxProperties'
        Properties.ClearKey = 46
        Properties.DropDownListStyle = lsFixedList
        Properties.ImmediatePost = True
      end
    end
    object cxGridLevel2: TcxGridLevel
      GridView = vSubject
    end
  end
  object qListPodrazd: TpFIBQuery
    Transaction = DMInv.trFibRead
    Database = DMInv.db
    SQL.Strings = (
      'SELECT'
      '  distinct'
      '  sd.sdid,'
      '  SD.SDNAME,'
      
        '  (SELECT O$NESTING_LEVEL FROM GET_SD_NESTING_LEVEL(D.SDID,1411)' +
        '),'
      
        '  (SELECT O$NESTING_LEVEL FROM GET_SD_NESTING_LEVEL(D.SDID,1412)' +
        '),'
      
        '  (SELECT O$NESTING_LEVEL FROM GET_SD_NESTING_LEVEL(D.SDID,1413)' +
        ')'
      'FROM DETI_PODRAZD_SC D'
      'JOIN SPEC_COND SC ON SC.SCID = D.SCID'
      '--JOIN AGR_POLUCH_USLUG PU ON PU.AGID = SC.AGID'
      'JOIN SYS_DIC SD ON SD.SDID = D.SDID'
      'WHERE --CURRENT_DATE BETWEEN D.DPDATEIN AND D.DPDATEOUT'
      '  --and d.dptype = 1'
      '  --and'
      
        '   (((SELECT O$NESTING_LEVEL FROM GET_SD_NESTING_LEVEL(D.SDID,14' +
        '11)) >= 0)'
      
        '  OR ((SELECT O$NESTING_LEVEL FROM GET_SD_NESTING_LEVEL(D.SDID,1' +
        '412)) >= 0)'
      
        '  OR ((SELECT O$NESTING_LEVEL FROM GET_SD_NESTING_LEVEL(D.SDID,1' +
        '413)) >= 0))'
      'order by 5,4,3,sd.sdname'
      ''
      '/*SELECT'
      '  distinct'
      '  sd.sdid,'
      '  SD.SDNAME,'
      
        '  (SELECT O$NESTING_LEVEL FROM GET_SD_NESTING_LEVEL(D.SDID,1411)' +
        '),'
      
        '  (SELECT O$NESTING_LEVEL FROM GET_SD_NESTING_LEVEL(D.SDID,1412)' +
        '),'
      
        '  (SELECT O$NESTING_LEVEL FROM GET_SD_NESTING_LEVEL(D.SDID,1413)' +
        ')'
      'FROM DETI_PODRAZD_SC D'
      'JOIN SPEC_COND SC ON SC.SCID = D.SCID'
      'JOIN AGR_POLUCH_USLUG PU ON PU.AGID = SC.AGID'
      'JOIN SYS_DIC SD ON SD.SDID = D.SDID'
      'WHERE CURRENT_DATE BETWEEN D.DPDATEIN AND D.DPDATEOUT'
      '  and d.dptype = 1'
      
        '  and (((SELECT O$NESTING_LEVEL FROM GET_SD_NESTING_LEVEL(D.SDID' +
        ',1411)) >= 0)'
      
        '  OR ((SELECT O$NESTING_LEVEL FROM GET_SD_NESTING_LEVEL(D.SDID,1' +
        '412)) >= 0)'
      
        '  OR ((SELECT O$NESTING_LEVEL FROM GET_SD_NESTING_LEVEL(D.SDID,1' +
        '413)) >= 0))'
      'order by 5,4,3,sd.sdname*/')
    Left = 241
    Top = 153
    qoStartTransaction = True
  end
  object qClassProgramSet: TpFIBQuery
    Transaction = DMInv.trFibWrite
    Database = DMInv.db
    SQL.Strings = (
      
        'execute procedure CJ_SET_CLASS_PROGRAM(:CLASS_ID,:SUBJECT_ID,:PR' +
        'OGRAM_ID)')
    Left = 353
    Top = 185
    qoAutoCommit = True
    qoStartTransaction = True
  end
  object qSubjects: TpFIBQuery
    Transaction = DMInv.trFibRead
    Database = DMInv.db
    SQL.Strings = (
      'select'
      '  s.sdid,'
      '  s.sdname'
      'from sys_dic s'
      'where s.sdparid = 35 and s.sdisdelete = 0'
      'order by s.sdname')
    Left = 89
    Top = 196
    qoStartTransaction = True
  end
  object qCourses: TpFIBQuery
    Transaction = DMInv.trFibRead
    Database = DMInv.db
    SQL.Strings = (
      'select'
      '  u.iduchebkurs,'
      '  u.cuchebkurs'
      'from uchebkurs u'
      'where u.uisdelete is null and'
      '  u.idpredmet = :SID')
    Left = 113
    Top = 268
    qoStartTransaction = True
  end
  object qInsertCourse: TpFIBQuery
    Transaction = DMInv.trFibWrite
    Database = DMInv.db
    SQL.Strings = (
      'INSERT INTO CJ_CLASS_PROGRAM '
      '(CLASS_ID, SUBJECT_ID, PROGRAM_ID)'
      'VALUES (:CID, :SID, :PID)')
    Left = 208
    Top = 328
    qoStartTransaction = True
  end
  object qUpdateCourse: TpFIBQuery
    Transaction = DMInv.trFibWrite
    Database = DMInv.db
    SQL.Strings = (
      'UPDATE CJ_CLASS_PROGRAM'
      'SET PROGRAM_ID = :PID'
      'WHERE CLASS_ID = :CID AND SUBJECT_ID = :SID')
    Left = 248
    Top = 352
    qoStartTransaction = True
  end
  object qGetCourse: TpFIBQuery
    Transaction = DMInv.trFibRead
    Database = DMInv.db
    SQL.Strings = (
      'SELECT PROGRAM_ID'
      'FROM CJ_CLASS_PROGRAM'
      'WHERE CLASS_ID = :CID AND SUBJECT_ID = :SID')
    Left = 160
    Top = 360
    qoStartTransaction = True
  end
  object qDeleteCourse: TpFIBQuery
    Transaction = DMInv.trFibWrite
    Database = DMInv.db
    SQL.Strings = (
      'DELETE FROM CJ_CLASS_PROGRAM'
      'WHERE CLASS_ID = :CID AND SUBJECT_ID = :SID')
    Left = 256
    Top = 304
    qoStartTransaction = True
  end
  object qLoadCourses: TpFIBQuery
    Transaction = DMInv.trFibRead
    Database = DMInv.db
    SQL.Strings = (
      'select'
      '  u.cuchebkurs'
      'from sys_dic s'
      
        'left join cj_class_program c on c.subject_id = s.sdid and c.clas' +
        's_id = :CID'
      
        'left join uchebkurs u on u.iduchebkurs = c.program_id and u.uisd' +
        'elete is null'
      'where s.sdparid = 35 and s.sdisdelete = 0'
      'order by s.sdname')
    Left = 137
    Top = 148
    qoStartTransaction = True
  end
  object qPAuto: TpFIBStoredProc
    Transaction = DMInv.trFibWrite
    Database = DMInv.db
    SQL.Strings = (
      'select * from CJ_PROGRAM_AUTO(:CID,:PAR)')
    StoredProcName = 'CJ_PROGRAM_AUTO'
    Left = 72
    Top = 296
    qoStartTransaction = True
  end
end
